package com.example.shiwu.util;

import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.shiwu.R;

public class TitleSettingUtil {

    public static TextView title_back;
    public static TextView title_text;
    public static TextView title_setting;


    public static void initTitle(String text, String setting, ImageView title_back, TextView title_text, TextView title_setting){

        if(null == title_back){
            title_back.setVisibility(View.INVISIBLE);
        }
        if(null != text && !text.equals("")){
            if(null != title_text) {
                title_text.setText(text);
            }
        }
        if(null != setting && !setting.equals("")){
            if(null != title_setting) {
                title_setting.setText(setting);
            }
        }else{
            if(null !=title_setting){
                title_setting.setVisibility(View.INVISIBLE);

            }
        }

    }
}


